package com.nageoffer.jobtrain.projects.service.handler.question.remote;

/**
 * author：唐晨
 */

import com.nageoffer.jobtrain.common.web.result.Result;
import com.nageoffer.jobtrain.projects.dto.resp.OjQuestionSubmitRespDTO;
import com.nageoffer.jobtrain.projects.service.handler.question.dto.OjQuestionSubmitJudgeDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 系统判题远程调用 -基于OpenFeign
 * author：唐晨
 */
@FeignClient(
        value = "JobTrain-judge",
        url = "${judge-manage.remote-url:}"
)
public interface OjQuestionSubmitCodeRemoteService {

    /**
     * 远程调用系统判题服务
     *
     * @param ojQuestionSubmitJudgeDTO 系统判断请求入参
     * @return 系统判题响应
     */
    @PostMapping("/api/job-train/judge/oj-judge")
    Result<OjQuestionSubmitRespDTO> ojQuestionJudge(@RequestBody OjQuestionSubmitJudgeDTO ojQuestionSubmitJudgeDTO);
}
